﻿<%@ Page Title="" Language="C#" MasterPageFile="~/master/admin.master" AutoEventWireup="true"
    CodeFile="edit.aspx.cs" Inherits="aspx_admin_tang_edit" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Title" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:FormView ID="FormView1" runat="server" DataKeyNames="讲堂ID" DataSourceID="ods讲堂动态"
        DefaultMode="Edit" Width="100%" OnItemCommand="FormView1_ItemCommand"
        OnItemUpdated="FormView1_ItemUpdated">
        <EditItemTemplate>

            <table>
                <tr>
                    <td>主标题
                    </td>
                    <td>
                        <asp:TextBox ID="标题TextBox" runat="server" Text='<%# Bind("标题") %>' CausesValidation="true"
                            Columns="50" /><asp:RequiredFieldValidator ID="RequiredFieldValidator8" ErrorMessage="*" ControlToValidate="标题TextBox"
                                runat="server" Display="Dynamic" />*
                    </td>
                </tr>
                <tr>
                    <td>副标题
                    </td>
                    <td>
                        <asp:TextBox ID="副标题TextBox" runat="server" Text='<%# Bind("副标题") %>' CausesValidation="true"
                            Columns="50" /><asp:RequiredFieldValidator ID="RequiredFieldValidator9" ErrorMessage="*" ControlToValidate="副标题TextBox"
                                runat="server" Display="Dynamic" />*
                    </td>
                </tr>
                <tr>
                    <td>主讲
                    </td>
                    <td>
                        <asp:TextBox ID="主讲人TextBox" runat="server" Text='<%# Bind("主讲人") %>' CausesValidation="true"
                            Columns="50" /><asp:RequiredFieldValidator ID="RequiredFieldValidator10" ErrorMessage="*"
                                ControlToValidate="主讲人TextBox" runat="server" Display="Dynamic" />*
                    </td>
                </tr>
                <tr>
                    <td>时间
                    </td>
                    <td>
                        <asp:TextBox ID="时间TextBox" runat="server" Text='<%# Bind("时间") %>' CausesValidation="true"
                            Columns="50" CssClass="date" /><asp:RequiredFieldValidator ID="RequiredFieldValidator11" ErrorMessage="*"
                                ControlToValidate="时间TextBox" runat="server" Display="Dynamic" />*
                    </td>
                </tr>
                <tr>
                    <td>地点
                    </td>
                    <td>
                        <asp:TextBox ID="地点TextBox" runat="server" Text='<%# Bind("地点") %>' CausesValidation="true"
                            Columns="50" /><asp:RequiredFieldValidator ID="RequiredFieldValidator12" ErrorMessage="*"
                                ControlToValidate="地点TextBox" runat="server" Display="Dynamic" />*
                    </td>
                </tr>
                <tr>
                    <td>主办
                    </td>
                    <td>
                        <asp:TextBox ID="主办TextBox" runat="server" Text='<%# Bind("主办") %>' CausesValidation="true"
                            Columns="50" /><asp:RequiredFieldValidator ID="RequiredFieldValidator13" ErrorMessage="*"
                                ControlToValidate="主办TextBox" runat="server" Display="Dynamic" />*
                    </td>
                </tr>
                <tr>
                    <td>承办
                    </td>
                    <td>
                        <asp:TextBox ID="承办TextBox" runat="server" Text='<%# Bind("承办") %>' CausesValidation="true"
                            Columns="50" /><asp:RequiredFieldValidator ID="RequiredFieldValidator14" ErrorMessage="*"
                                ControlToValidate="承办TextBox" runat="server" Display="Dynamic" />*
                    </td>
                </tr> <tr>
                    <td>重要性值</td>
                    <td>
                        <asp:TextBox Text='<%# Bind("重要性") %>' runat="server" ID="txt重要性" />
                    </td>
                </tr>
               <tr>
                    <td></td>
                    <td>

                        <asp:CheckBox Checked='<%# Bind("新") %>' runat="server" ID="ccb新" Text="标记为new" />
                        <asp:CheckBox Checked='<%# Bind("置顶") %>' runat="server" ID="ccb置顶" Text="置顶" />
                        <asp:CheckBox Checked='<%# Bind("红字") %>' runat="server" ID="CheckBox1" Text="红字" />
                    </td>
                </tr>
               
                <tr>
                    <td colspan="2">全文内容<asp:RequiredFieldValidator ID="RequiredFieldValidator15" ErrorMessage="*" ControlToValidate="全文内容TextBox"
                        runat="server" Display="Static" />*    <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                            CssClass="btn" Text="更新" />
                        &nbsp;
                        <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                            CssClass="btn" Text="取消" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:TextBox ID="全文内容TextBox" runat="server" Text='<%# Bind("全文内容") %>' TextMode="MultiLine"
                            Columns="80" Rows="16" CausesValidation="true" />
                    </td>
                </tr>

                <tr>
                    <td>讲堂ID
                    </td>
                    <td>
                        <asp:Label ID="讲堂IDLabel1" runat="server" Text='<%# Eval("讲堂ID") %>' />
                    </td>
                </tr>

            </table>
        </EditItemTemplate>
    </asp:FormView>
    <asp:ObjectDataSource ID="ods讲堂动态" runat="server"
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataBy讲堂ID" TypeName="ds_名师讲堂TableAdapters.tb_讲堂TableAdapter"
        UpdateMethod="Update">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="0" Name="讲堂ID" QueryStringField="id" Type="Int32" />
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="标题" Type="String" />
            <asp:Parameter Name="主讲人" Type="String" />
            <asp:Parameter Name="时间" Type="DateTime" />
            <asp:Parameter Name="地点" Type="String" />
            <asp:Parameter Name="承办" Type="String" />
            <asp:Parameter Name="主办" Type="String" />
            <asp:Parameter Name="置顶" Type="Boolean" />
            <asp:Parameter Name="新" Type="Boolean" />
            <asp:Parameter Name="副标题" Type="String" />
            <asp:Parameter Name="全文内容" Type="String" />
            <asp:Parameter Name="红字" Type="Boolean" />
            <asp:Parameter Name="重要性" Type="Single" />
            <asp:Parameter Name="Original_讲堂ID" Type="Int32" />
        </UpdateParameters>
    </asp:ObjectDataSource>
</asp:Content>